package x.ovo.wechat.bot;

import x.ovo.wechat.bot.common.command.CommandExecutor;
import x.ovo.wechat.bot.common.event.Event;
import x.ovo.wechat.bot.common.event.EventListener;
import x.ovo.wechat.bot.common.plugin.Plugin;

import java.util.Objects;

public class ComeDogPlugin extends Plugin {
    @Override
    public void onEnable() {
        this.reloadConfig();
    }

    @Override
    public void onDisable() {

    }

    @Override
    public void onLoad() {
        if (Objects.isNull(this.getConfig())) this.saveDefaultConfig();
    }

    @Override
    public CommandExecutor getCommandExecutor() {
        return new ComeDogCommandExecutor(this);
    }

    @Override
    public EventListener<? extends Event<?>> getEventListener() {
        return new ComeDogListener();
    }
}
